<template>
  <div class="simple-sidebar">
    <ul>
      <li v-for="item in menuItems" :key="item.path">
        <router-link :to="item.path">
          <el-icon><component :is="item.icon" /></el-icon>
          <span>{{ item.title }}</span>
        </router-link>
      </li>
    </ul>
  </div>
</template>

<script setup>
import { House, Histogram, User } from '@element-plus/icons-vue'

const menuItems = [
  { title: '展示信息', path: '/display-data', icon: House },
  { title: 'Ai分析', path: '/showdata', icon: Histogram },
  { title: '用户习惯', path: '/user-preference', icon: User }
];
</script>

<style scoped>
.simple-sidebar {
  position: fixed;
  min-height: 100vh;
  width: 220px;
  background: linear-gradient(180deg, #b6d9f2 0%, #f6cfe9 100%);
  padding: 20px;
  border-right: 1px solid #aacbeb;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
}

.simple-sidebar ul {
  list-style: none;
  padding: 0;
}

.simple-sidebar li {
  position: relative;
  min-height: 15vh;
  margin-bottom: 10px;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(229, 241, 252, 0.6) 100%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.simple-sidebar li:hover {
  background: linear-gradient(135deg, #d2e6f9 0%, #fad7eb 100%);
  transform: scale(1.02);
}

.simple-sidebar a {
  position: absolute;
  text-decoration: none;
  color: #333;
  display: flex;
  align-items: center;
  padding: 15px 10px;
  height: 100%;
}

.simple-sidebar a {
  display: flex;
  align-items: center;
}

.simple-sidebar .el-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
}

span {
  font-weight: bolder;
  font-size: large;
  margin-left: 10px;
  line-height: 1;
}

.el-icon {
  font-size: 20px;
  color: #409eff;
  background: -webkit-linear-gradient(135deg, #409eff, #ff69b4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.simple-sidebar a:hover {
  color: #42b983;
}
</style>